const obj = {
    init: function() {
        this.eventAdd();
    },
    getValues: function() {
        const input = document.getElementsByTagName('input');
        const arr = [];
        for(let i = 0; i < input.length; i ++) {
            arr.push(parseFloat(input[i].value));
        }
        return arr;
    },
    eventAdd: function() {
        const btn = document.getElementsByTagName('button')[0];
        const maxSpan = document.getElementById('spanmax');
        const minSpan = document.getElementById('spanmin');
        const that = this;
        btn.onclick = function() {
            const arr = that.getValues();
            console.log(arr);
            maxSpan.innerHTML = Math.max(...arr);
            minSpan.innerHTML = Math.min(...arr);
        }
    }
}

obj.init();